import request from '@/utils/request';

/** 查询定制类型列表 定稿顺序列表*/
export const getFinalDraftListApi = (data: any) => {
    return request({
        url: '/system/customizedType/list',
        method: 'post',
        data: data
    })
};

/** 新增定制类型 定稿类型 */
export const addFinalDraftApi = (data: any) => {
    return request({
        url: '/system/customizedType',
        method: 'post',
        data: data
    });
};

/** 修改定制类型列表 */
export const editFinalDraftApi = (data: any) => {
    return request({
        url: `/system/customizedType`,
        method: 'put',
        data: data
    });
};

/** 获取定制类型列表详细信息 */
// export const getPFinalDraftDetailApi = (id: any) => {
//     return request({
//         url: `/system/customizedType/${id}`,
//         method: 'get'
//     });
// };

/** 删除定制类型列表 */
export const deleteFinalDraftApi = (ids: any) => {
    return request({
        url: `/system/customizedType/${ids}`,
        method: 'delete'
    });
};

/**  新增定制类型关联工序 */
export const addWorkingProcedureApi = (data: any) => {
    return request({
        url: '/system/customizedTypeJoinProcedure',
        method: 'post',
        data: data
    });
};

/** 修改定制类型关联工序 */
export const editWorkingProcedureApi = (data: any) => {
    return request({
        url: `/system/customizedTypeJoinProcedure`,
        method: 'put',
        data: data
    });
};

/**  查询定制类型关联工序列表 */

export const getWorkingProcedureListApi = (query: any) => {
    return request({
        url: '/system/customizedType/getTypeProcedureInfo',
        method: 'get',
        params: query
    });
};

/** 删除定制类型关联工序 */
export const deleteWorkingProcedureApi = (ids: any) => {
    return request({
        url: `/system/customizedTypeJoinProcedure/${ids}`,
        method: 'delete'
    });
};

/** 查询所有工序 */
export const getAllWorkingProcedureListApi = () => {
    return request({
        url: '/system/workingProcedureInfo/getAllProcedureList',
        method: 'get',
    });
};

/** 查询所有的定制类型 */
export const getAllTypeApi = () => {
    return request({
        url: '/system/customizedType/getAllType',
        method: 'get',
    });
};
